當需求已經被撰寫,你review後要去準備dynamic test
撰寫測試情形來去找到defects
A TEST SCENARIO is defined as any functionality that can be tested
又稱 test condition或test possibility
必須要把自己變成 end user 並寫測項 Application Under Test
如何撰寫test scenario
- 謹慎的閱讀需求文件 BRS, STS, FRS, SUT
- 分離出每個需求,並找出那些動作是需要被測試的。找出那些技術問題跟需求有關,並且記得要去分析和框出問題
- 列舉測試情境來確保可以覆蓋到每個可能的software feature。包含 user flow和bussiness flow
- 列舉完以後,建立可以追蹤的表格來確保每個需求都可以有對應的測項
- 給supervisor review這些測項,並且reviewed by other stakeholder
搜尋一些常用的測試情境
E-commerce Website
以下這些都是E-commerce website常見的測試案例
https://blog.qatestlab.com/2023/04/10/cms-testing-ecommerce/
https://testsigma.com/blog/test-cases-for-ecommerce-website/
https://www.qatouch.com/blog/how-to-write-test-cases-for-ecommerce-website-in-a-best-way/
設定Trello
search for template: scrum board
可以用來建立test scenario -> add check list
開始建立Facebook註冊帳號的test cases
Facebook login and sign up
- take sign up snapshot and add it in trello
- 開始寫測試
- 每一個欄位都有valid和invalid的值
- 很長、亂碼、不符合規格
- 從valid開始
Sign up page
Valid scenario:
- Validate sign up with valid phone number
- Validate sign up with valid email
- Validate sign up with Chinese First and Surname
- Validate sign up with Arabic First and Surname
- Validate providing a short valid first or surname "E.g: jy hsu"
- Validate providing a mobile number with and without country code "E.g. +8869123456789、09123456789、886916631438"
- Validate sign with valid age in the range of 13 and 18 years old
- Validate sign with valid age in the range of 18 and 120 years old
- Validate providing different values for Gender
Invalid:
- Validate leaving first name field empty
- Validate leaving Surname field empty
- Validate leaving email or phone number field empty
- Validate leaving password field empty
- Validate leaving gender field empty
- Verify providing numbers or special characters in first name
- Verify providing numbers or special characters in Sur name
- Verify providing very short first name 'N'
- Verify providing very short sur name 'N'
- Verify providing very long first name 'more than 50 characters'
- Verify providing a short mobile number "1234"
- Verify providing a long mobile number "more than 15 digits"
- Verify providing a space in the mobile number
- Verify copy/paste mobile number from another website or application
- Verify adding an email with wrong format (e.g. abc32423#)
- Verify adding an email with a mistake in the format "xxxx@gamil.com"
- Validate a password with less than 6 digits (e.g. A12#1)
- Validate a password without letters (e.g. 12345!@#)
- Validate a password without numbers (e.g. abcd!@#)
- Validate a password without special characters (e.g. 123asdfw)
- Validate providing a date of birth less than 13
- Validate providing a date of birth more than 120
Snapshot password rules
- Six digits
- include numbers
- includes letters
- includes special characters
Login page
Login valid scenario:
- Login with a valid email address and a valid password
- Login with a valid phone number and a valid password
- Login with different ways of writing phone number
- Login with valid user without verifying email or phone number
- Login with a valid password after using forgotten password functionality
- Check show password button
- Check copy/paste of password
- Validate that after login user is redirection to Newsfeed page
- Login with a deactivated account
- Login with a suspended account
Redirections
- Validate redirection to forgotten password
- Validate redirection to Sign up page
- Validate redirection to Create a page page
Login Invalid scenarios:
- Login with leaving phone or email field empty
- Login with leaving password field empty
- Login with an invalid email "not registered"
- Login with an invalid email "wrong format"
- Login with invalid phone number "not register"
- Login with invalid phone number "wrong format
- Login with invalid password with valid email
- Login with invalid password
- Login with a valid password after being blocked form accessing the app
- Login with providing an old password
Compatibility Testing
- Test using Chrome
- Test using Firefox
- Test using Edge
- Test using Safari
- Test using Safari on iPhone
- Test using Chrome on iPhone
- Test using Chrome on Android
- Test using any browser on a tablet
本文章同步發布於個人blogger。